project "rtc_base"
    kind "StaticLib"
    language "C++"

    defines{
        "NOMINMAX"
    }

    files {
        "basictypes.h",
        "constructormagic.h",
        "logging.cc",
        "logging.h",       
        'atomicops.h',
        'basictypes.h',
        'bitbuffer.cc',
        'bitbuffer.h',
        'buffer.cc',
        'buffer.h',
        'bufferqueue.cc',
        'bufferqueue.h',
        'bytebuffer.cc',
        'bytebuffer.h',
        'byteorder.h',
        'checks.cc',
        'checks.h',
        'constructormagic.h',
        'criticalsection.cc',
        'criticalsection.h',
        'event.cc',
        'event.h',
        'event_tracer.cc',
        'event_tracer.h',
        'exp_filter.cc',
        'exp_filter.h',
        'logging.cc',
        'logging.h',
        'md5.cc',
        'md5.h',
        'md5digest.cc',
        'md5digest.h',
        'platform_file.cc',
        'platform_file.h',
        'platform_thread.cc',
        'platform_thread.h',
        'ratetracker.cc',
        'ratetracker.h',
        'safe_conversions.h',
        'safe_conversions_impl.h',
        'scoped_ptr.h',
        'stringencode.cc',
        'stringencode.h',
        'stringutils.cc',
        'stringutils.h',
        'systeminfo.cc',
        'systeminfo.h',
        'template_util.h',
        'thread_annotations.h',
        'thread_checker.h',
        'thread_checker_impl.cc',
        'thread_checker_impl.h',
        'timeutils.cc',
        'timeutils.h',
        'trace_event.h',

        "arraysize.h",
        "asyncfile.cc",
        "asyncfile.h",
        "asyncinvoker-inl.h",
        "asyncinvoker.cc",
        "asyncinvoker.h",
        "asyncpacketsocket.cc",
        "asyncpacketsocket.h",
        "asyncresolverinterface.cc",
        "asyncresolverinterface.h",
        "asyncsocket.cc",
        "asyncsocket.h",
        "asynctcpsocket.cc",
        "asynctcpsocket.h",
        "asyncudpsocket.cc",
        "asyncudpsocket.h",
        "autodetectproxy.cc",
        "autodetectproxy.h",
        "base64.cc",
        "base64.h",
        "basicdefs.h",
        "common.cc",
        "common.h",
        "crc32.cc",
        "crc32.h",
        "cryptstring.cc",
        "cryptstring.h",
        "diskcache.cc",
        "diskcache.h",
        "filerotatingstream.cc",
        "filerotatingstream.h",
        "fileutils.cc",
        "fileutils.h",
        "firewallsocketserver.cc",
        "firewallsocketserver.h",
        "flags.cc",
        "flags.h",
        "format_macros.h",
        "gunit_prod.h",
        "helpers.cc",
        "helpers.h",
        "httpbase.cc",
        "httpbase.h",
        "httpclient.cc",
        "httpclient.h",
        "httpcommon-inl.h",
        "httpcommon.cc",
        "httpcommon.h",
        "httprequest.cc",
        "httprequest.h",
        --"iosfilesystem.mm",
        "ipaddress.cc",
        "ipaddress.h",
        "linked_ptr.h",
        "mathutils.h",
        "messagedigest.cc",
        "messagedigest.h",
        "messagehandler.cc",
        "messagehandler.h",
        "messagequeue.cc",
        "messagequeue.h",
        "nethelpers.cc",
        "nethelpers.h",
        "network.cc",
        "network.h",
        "nullsocketserver.h",
        "pathutils.cc",
        "pathutils.h",
        "physicalsocketserver.cc",
        "physicalsocketserver.h",
        "proxydetect.cc",
        "proxydetect.h",
        "proxyinfo.cc",
        "proxyinfo.h",
        "ratelimiter.cc",
        "ratelimiter.h",
        "ratetracker.cc",
        "ratetracker.h",
        "rtccertificate.cc",
        "rtccertificate.h",
        --"scoped_autorelease_pool.h",
        --"scoped_autorelease_pool.mm",
        "sha1.cc",
        "sha1.h",
        "sha1digest.cc",
        "sha1digest.h",
        "signalthread.cc",
        "signalthread.h",
        "sigslot.cc",
        "sigslot.h",
        "sigslotrepeater.h",
        "socket.h",
        "socketadapters.cc",
        "socketadapters.h",
        "socketaddress.cc",
        "socketaddress.h",
        "socketaddresspair.cc",
        "socketaddresspair.h",
        "socketfactory.h",
        "socketpool.cc",
        "socketpool.h",
        "socketserver.h",
        "socketstream.cc",
        "socketstream.h",
        "ssladapter.cc",
        "ssladapter.h",
        "sslfingerprint.cc",
        "sslfingerprint.h",
        "sslidentity.cc",
        "sslidentity.h",
        "sslsocketfactory.cc",
        "sslsocketfactory.h",
        "sslstreamadapter.cc",
        "sslstreamadapter.h",
        "sslstreamadapterhelper.cc",
        "sslstreamadapterhelper.h",
        "stream.cc",
        "stream.h",
        "task.cc",
        "task.h",
        "taskparent.cc",
        "taskparent.h",
        "taskrunner.cc",
        "taskrunner.h",
        "thread.cc",
        "thread.h",
        "timing.cc",
        "timing.h",
        "urlencode.cc",
        "urlencode.h",
        "worker.cc",
        "worker.h",

        "bandwidthsmoother.cc",
        "bandwidthsmoother.h",
        "bind.h",
        "bind.h.pump",
        "callback.h",
        "callback.h.pump",
        "fileutils_mock.h",
        "genericslot.h",
        "genericslot.h.pump",
        "httpserver.cc",
        "httpserver.h",
        "json.cc",
        "json.h",
        "logsinks.cc",
        "logsinks.h",
        "mathutils.h",
        "multipart.cc",
        "multipart.h",
        "natserver.cc",
        "natserver.h",
        "natsocketfactory.cc",
        "natsocketfactory.h",
        "nattypes.cc",
        "nattypes.h",
        "optionsfile.cc",
        "optionsfile.h",
        "profiler.cc",
        "profiler.h",
        "proxyserver.cc",
        "proxyserver.h",
        "refcount.h",
        "referencecountedsingletonfactory.h",
        "rollingaccumulator.h",
        "scoped_ref_ptr.h",
        "scopedptrcollection.h",
        "sec_buffer.h",
        "sharedexclusivelock.cc",
        "sharedexclusivelock.h",
        "sslconfig.h",
        "sslroots.h",
        "testclient.cc",
        "testclient.h",
        "transformadapter.cc",
        "transformadapter.h",
        "versionparsing.cc",
        "versionparsing.h",
        "virtualsocketserver.cc",
        "virtualsocketserver.h",
        "window.h",
        "windowpicker.h",
        "windowpickerfactory.h",        
    }

    if not is_pfm("windows") then
        files{
            "unixfilesystem.cc",
            "unixfilesystem.h",  
            "latebindingsymboltable.cc",
            "latebindingsymboltable.cc.def",
            "latebindingsymboltable.h",
            "latebindingsymboltable.h.def",
            "posix.cc",
            "posix.h",                     
        }
    end

    if is_pfm("ios|mac") then
        files{
            "macasyncsocket.cc",
            "macasyncsocket.h",
            "maccocoasocketserver.h",
            "maccocoasocketserver.mm",
            "macsocketserver.cc",
            "macsocketserver.h",
            "macwindowpicker.cc",
            "macwindowpicker.h",            
        }
    end

    if is_pfm("ios") then
        files{
            "macconversion.cc",
            "macconversion.h",    
            "iosfilesystem.mm",        
        }
    elseif is_pfm("mac") then
        files {
            "maccocoathreadhelper.h",
            "maccocoathreadhelper.mm",
            "macconversion.cc",
            "macconversion.h",
            "macutils.cc",
            "macutils.h",
        }
    elseif is_pfm("windows") then
        files{
            "diskcache_win32.cc",
            "diskcache_win32.h",
            "win32regkey.cc",
            "win32regkey.h",
            "win32socketinit.cc",
            "win32socketinit.h",
            "win32socketserver.cc",
            "win32socketserver.h",   
            "schanneladapter.cc",
            "schanneladapter.h",
            "win32.cc",
            "win32.h",
            "win32filesystem.cc",
            "win32filesystem.h",
            "win32securityerrors.cc",
            "win32window.cc",
            "win32window.h",
            "win32windowpicker.cc",
            "win32windowpicker.h",
            "winfirewall.cc",
            "winfirewall.h",
            "winping.cc",
            "winping.h",                     
        }
    elseif is_pfm("android") then
        files{
            "ifaddrs-android.cc",
            "ifaddrs-android.h",        
        }
    end        